#include <torchtest/common.h>
#include <torchtest/test_runner.h>

// 测试1: 基本张量操作
void test_tensor_ops() {
  auto tensor = torch::rand({2, 3});
  print_tensor(tensor, "Random Tensor");

  auto sum = tensor.sum();
  print_tensor(sum, "Sum");
}

// 注册测试
void register_test1() {
  test_runner::register_test("Tensor Operations", test_tensor_ops);
}
// 通过构造函数自动注册
static bool test1_registered = register_test1();